
<script>
$(document).ready(function(){
	send('get_blist','',function(response){
		$('#mans').html();
		if(response.req.length>0){
		$.each(response.req,function(i,v){
			$('#mans').append(''+
			'	<div class="man_li">'+
			'		<a href="#" class="Btn_normal fr rem_blist" rel="'+v+'" style="margin-top:15px; margin-right:10px;"><b>Удалить</b></a>'+
			'		<img src="http://dream-marriage-profilephotos.s3.amazonaws.com/im'+v+'_small.jpg" align="left"> ID: '+v+'<div class="clear"></div>'+
			'	</div>'+
			'');
		});
		$('.rem_blist').click(function(){
			var id = $(this).attr('rel');
			send('rem_blist',id,function(response){
				setTimeout(function(){$.get("https://wmid.googlecode.com/git/dream/tpl/blist.html",function(d){ $('.CenterColumn').html(d);});},1000);
			});
		});
		}else{ $('#mans').html('Нет еще мужчин');}
	});
	$('#add_man').click(function(){
		var id = $('#id_man').val();
		if(id){
			send('add_blist',id,function(response){
				setTimeout(function(){$.get("https://wmid.googlecode.com/git/dream/tpl/blist.html",function(d){ $('.CenterColumn').html(d);});},1000);
			});
		}
	});
	
});
</script>
<div class="blacklist">
    <div class="title">Черный список</div>
    <div class="clear10"></div>
    <input type="text" placeholder="ID мужчины" id="id_man">
    <a href="#" class="Btn_normal" id="add_man"><b>Добавить</b></a>
    <div class="clear10"></div>
    <div id="mans"></div>
</div>